import request from "./request";


//分页获取图书列表
export function searchTypesApi(params:any) {
    return request({
        url: '/back/list',
        method: 'GET',
        params
    })
}

//查询一个
export function getOneByIdApi(id: any) {
    return request({
        url: '/api/admin/sys/custom/field/detail/' + id,
        method: 'get',
    })
}


//
export function addApi(data: any) {
    return request({
        url: "/t-type/addtypename",
        method: 'post',
        data
    })
}

//根据图书id更新type
export function editTypeApi(data: any) {
    return request({
        url: "/t-type/updatebooktypebyid",
        method: 'post',
        data
    })
}

//根据 id删除id
export function deleteApi(data: any) {
    return request({
        url: "/back/delete",
        method: 'delete',
        data
    })
}